//
//  BaseModel.h
//  FrameWork
//
//  Created by dlios on 15/7/1.
//  Copyright (c) 2015年 SJF1992. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface BaseModel : NSObject<NSCoding>

@property (nonatomic, retain) NSString *name;
@property (nonatomic, assign) NSInteger age;
@property (nonatomic, assign) NSInteger num;

#pragma mark-初始化
- (id)initWithDic:(NSDictionary *)dic;
#pragma mark-便利构造器
+ (id)baseModelWith:(NSDictionary *)dic;
#pragma mark-容错方法
- (void)setValue:(id)value forUndefinedKey:(NSString *)key;
-(id)valueForUndefinedKey:(NSString *)key;

+(NSMutableArray *)arrWithModelByArr:(NSArray *)array;



// 归档
- (void)encodeWithCoder:(NSCoder *)aCoder;
// 解档
- (instancetype)initWithCoder:(NSCoder *)aDecoder;


@end
